/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package inteligenciaartificial;


import inteligenciaartificial.Individuo.Operador;
import java.awt.Cursor;
import java.awt.Dialog;
import java.util.Map;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;

/**
 *
 * @author Fer
 */
public class VentanaPrincipal extends javax.swing.JFrame {

    int mat1=0; int mat2=0; int mat3=0; int mat4=0;
    int mat5=0; int mat6=0; int mat7=0; int mat8=0;
    
    Intervalo[] intervalos = null;
    
    AcercaDe acercaDe;
    
    int mejorUtilidad;
    HistorialUtilidades utilidades;
    Generacion nuevaGeneracion;
    boolean pausado =false;
    boolean cancelado =true;
    boolean finCorrida=false;
    int indiceGeneracion =0;
    int indiceGeneracionMostrada= 0;
//    Paragraph textoPDF = new Paragraph(); 
    
    /**
     * Creates new form VistaAvanzada
     */
    public VentanaPrincipal() {
        initComponents();
        cambiarATabNro(0); 
    }
    
    public void iniciarCorrida(){

        try{   
            final SwingWorker iniciarWorker = new SwingWorker(){

             @Override
              protected Object doInBackground() throws Exception {

                    labelGeneración.setText("Población Inicial");

                    GeneracionManager.crearGeneracionInicial();

                    //setter historial de utilidades para condicion parada
                    utilidades= new HistorialUtilidades(Settings.objectivoGeneraciones);
                    
                    labelMasApto.setText("...");
                    labelPromedio.setText("...");
                    labelMenosApto.setText("...");

                    avanzarGeneraciones();

                throw new UnsupportedOperationException("Not supported yet.");
                }
            };

            iniciarWorker.execute();

        }catch (Exception e){
            //este mensaje se muestra en caso de que algún material ingresado por el usuario
            //sea incorrecto
            JOptionPane.showMessageDialog(this,"Algunas cantidades son incorrectas. Por favor modifíquelas e intente nuevamente." , "Error", 1);
        }

    }

    private void reanudarIteraciones() {
        final SwingWorker worker = new SwingWorker(){

             @Override
              protected Object doInBackground() throws Exception {

                    avanzarGeneraciones();  

                throw new UnsupportedOperationException("Not supported yet.");
                }
            };

        worker.execute();
    }

    private void avanzarGeneraciones(){

        do{       
            nuevaGeneracion= GeneracionManager.crearNuevaGeneracion();  
            indiceGeneracion++;

            labelGeneración.setText("Generación " + indiceGeneracion);
            
            mejorUtilidad=  nuevaGeneracion.obtenerMejorAptitud();
            
            //guardo mejor utilidad
            utilidades.agregarUtilidad(mejorUtilidad);
            //condiciones de parada
            
            //por alcanzar el maximo teorico
            if(mejorUtilidad>=(IndividuoManager.getMaximoTeorico()*GeneracionManager.porcentajeDeAceptacion)) {
                if(utilidades.iguales()){
                    finCorrida=true;
                }
            }
            //por alcanzar el limite de generaciones
            if(nuevaGeneracion.getNroDeGeneracion()==GeneracionManager.cantidadGeneraciones) {
                finCorrida=true;
            }
        }while(!pausado&& !finCorrida &&!cancelado);

        if(cancelado){
            actualizarPantallaCancelarCorrida();
            return;
        }
        if(pausado){
           actualizarPantallaPausaCorrida();
           return;
        }
        if (finCorrida)  {
            actualizarPantallaFinCorrida();
        }
    }
    
    private void actualizarPantallaIniciarCorrida(){
        
        //actualizar estado de botones
        botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Pause64.png")));
        botonAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Stop64.png")));
        botonPausar.setEnabled(true);
        botonGuardar.setEnabled(false);
        btnAtrasCorrida.setEnabled(false);
        botonPrimeraGeneracion.setEnabled(false);
        botonSiguienteGeneracion.setEnabled(false);
        botonAnteriorGeneracion.setEnabled(false);
        botonUltimaGeneracion.setEnabled(false);
        
        //actualizar labels
        lblCalculandoMostrando.setText("Calculando:");
        labelProgreso.setText("En progreso");

        limpiarTabla();
    }

    private void actualizarPantallaPausaCorrida(){
        
        indiceGeneracionMostrada= indiceGeneracion;
        botonPoblacionActual.setEnabled(true);
        mostrarEvolucion.setEnabled(true);
        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada); 
        actualizarBotonesNavegacion();
    }

    private void actualizarPantallaFinCorrida(){
        
        botonPausar.setEnabled(false);
        botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Pause64.png")));
        botonGuardar.setEnabled(true);
        btnAtrasCorrida.setEnabled(true);
        botonPoblacionActual.setEnabled(true);
        mostrarEvolucion.setEnabled(true);
        cancelado=true;
        botonAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Play64.png")));
        labelProgreso.setText("Finalizada");
        lblCalculandoMostrando.setText("Mostrando:");

        indiceGeneracionMostrada= indiceGeneracion;
        actualizarBotonesNavegacion();

        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada);
    }

    private void actualizarPantallaCancelarCorrida(){

        labelMasApto.setText("...");
        labelPromedio.setText("...");
        labelMenosApto.setText("...");
        this.labelGeneración.setText("Corrida cancelada");
        this.labelProgreso.setText("Cancelada");
        limpiarTabla();
        mostrarEvolucion.setEnabled(false);
        botonPoblacionActual.setEnabled(false);
        btnAtrasCorrida.setEnabled(true); 
        botonAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Play64.png")));
        botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Pause64.png")));
        lblCalculandoMostrando.setText("Mostrando:");
        botonPausar.setEnabled(false);
        mostrarEvolucion.setEnabled(false);
        botonPoblacionActual.setEnabled(false);
        botonPrimeraGeneracion.setEnabled(false);
        botonSiguienteGeneracion.setEnabled(false);
        botonAnteriorGeneracion.setEnabled(false);
        botonUltimaGeneracion.setEnabled(false);
        tablaMejoresInd.setValueAt("",0, 6);
        tablaMejoresInd.setValueAt("",1, 6);
        tablaMejoresInd.setValueAt("",2, 6);
    }


    private void actualizarDatoMejoresIndividuos(int nroGeneracion) {
        
        Generacion generacion= GeneracionManager.getGeneracionNumero(nroGeneracion);
        labelGeneración.setText("Generación " + nroGeneracion);
        labelMasApto.setText((String.valueOf(generacion.obtenerMejorAptitud())));
        labelMenosApto.setText((String.valueOf(generacion.obtenerPeorAptitud())));
        labelPromedio.setText((String.valueOf(generacion.calcularAptitudPromedio())));

        Individuo[] mejoresInd= generacion.obtenerMejoresIndividuos(3);

        for(int r=0; r<3;r++){
            tablaMejoresInd.setValueAt(mejoresInd[r].getNroIndividuo(), r, 0);
            tablaMejoresInd.setValueAt(AptitudUtilidad.calcularAptitud(mejoresInd[r]), r, 5);
            for(int c=1; c<5;c++){
                tablaMejoresInd.setValueAt(mejoresInd[r].getCantidadProducto(c), r, c);
            }
        }   
        tablaMejoresInd.setValueAt("        Ver detalle",0, 6);
        tablaMejoresInd.setValueAt("        Ver detalle",1, 6);
        tablaMejoresInd.setValueAt("        Ver detalle",2, 6);
    }

    private void limpiarTabla() {
       for(int r=0; r<3;r++){
           for(int c=0; c<6;c++){
               tablaMejoresInd.setValueAt("", r, c);
           }
       }
    }
    
    private void actualizarBotonesNavegacion() {
        if(indiceGeneracionMostrada==0){
            botonPrimeraGeneracion.setEnabled(false);
            botonAnteriorGeneracion.setEnabled(false);
        }else{
            botonPrimeraGeneracion.setEnabled(true);
            botonAnteriorGeneracion.setEnabled(true);
        }
        
        if(indiceGeneracionMostrada==indiceGeneracion){
            botonSiguienteGeneracion.setEnabled(false);
            botonUltimaGeneracion.setEnabled(false);
        }else{
            botonSiguienteGeneracion.setEnabled(true);
            botonUltimaGeneracion.setEnabled(true);
        }
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabs = new javax.swing.JTabbedPane();
        panelMateriasPrimas = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jLabel61 = new javax.swing.JLabel();
        m1 = new javax.swing.JTextField();
        jLabel100 = new javax.swing.JLabel();
        m2 = new javax.swing.JTextField();
        jLabel101 = new javax.swing.JLabel();
        m3 = new javax.swing.JTextField();
        jLabel102 = new javax.swing.JLabel();
        m5 = new javax.swing.JTextField();
        jLabel103 = new javax.swing.JLabel();
        m6 = new javax.swing.JTextField();
        jLabel104 = new javax.swing.JLabel();
        m7 = new javax.swing.JTextField();
        jLabel105 = new javax.swing.JLabel();
        m4 = new javax.swing.JTextField();
        jLabel106 = new javax.swing.JLabel();
        m8 = new javax.swing.JTextField();
        botonSiguienteMP = new javax.swing.JButton();
        botonAleatorio = new javax.swing.JButton();
        botonLimpiar = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        panelProducto = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtP1M1Min = new javax.swing.JTextField();
        txtP1M1Max = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        txtP1M2Max = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        txtP1M2Min = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        txtP1M3Max = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        txtP1M3Min = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        txtP1M4Max = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        txtP1M4Min = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        txtP1M8Min = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        txtP1M6Min = new javax.swing.JTextField();
        txtP1M6Max = new javax.swing.JTextField();
        txtP1M7Min = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        txtP1M8Max = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        txtP1M7Max = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        txtP1M5Min = new javax.swing.JTextField();
        txtP1M5Max = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        txtP2M1Min = new javax.swing.JTextField();
        txtP2M1Max = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        txtP2M2Max = new javax.swing.JTextField();
        jLabel31 = new javax.swing.JLabel();
        txtP2M2Min = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        txtP2M3Max = new javax.swing.JTextField();
        jLabel33 = new javax.swing.JLabel();
        txtP2M3Min = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        txtP2M4Max = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        txtP2M4Min = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        txtP2M8Min = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        txtP2M6Min = new javax.swing.JTextField();
        txtP2M6Max = new javax.swing.JTextField();
        txtP2M7Min = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        txtP2M8Max = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        txtP2M7Max = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        txtP2M5Min = new javax.swing.JTextField();
        txtP2M5Max = new javax.swing.JTextField();
        jLabel44 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel62 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        txtP3M1Min = new javax.swing.JTextField();
        txtP3M1Max = new javax.swing.JTextField();
        jLabel64 = new javax.swing.JLabel();
        txtP3M2Max = new javax.swing.JTextField();
        jLabel65 = new javax.swing.JLabel();
        txtP3M2Min = new javax.swing.JTextField();
        jLabel66 = new javax.swing.JLabel();
        txtP3M3Max = new javax.swing.JTextField();
        jLabel67 = new javax.swing.JLabel();
        txtP3M3Min = new javax.swing.JTextField();
        jLabel68 = new javax.swing.JLabel();
        txtP3M4Max = new javax.swing.JTextField();
        jLabel69 = new javax.swing.JLabel();
        txtP3M4Min = new javax.swing.JTextField();
        jLabel70 = new javax.swing.JLabel();
        txtP3M8Min = new javax.swing.JTextField();
        jLabel71 = new javax.swing.JLabel();
        jLabel72 = new javax.swing.JLabel();
        jLabel73 = new javax.swing.JLabel();
        txtP3M6Min = new javax.swing.JTextField();
        txtP3M6Max = new javax.swing.JTextField();
        txtP3M7Min = new javax.swing.JTextField();
        jLabel74 = new javax.swing.JLabel();
        txtP3M8Max = new javax.swing.JTextField();
        jLabel75 = new javax.swing.JLabel();
        jLabel76 = new javax.swing.JLabel();
        txtP3M7Max = new javax.swing.JTextField();
        jLabel77 = new javax.swing.JLabel();
        txtP3M5Min = new javax.swing.JTextField();
        txtP3M5Max = new javax.swing.JTextField();
        jLabel78 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jLabel79 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        txtP4M1Min = new javax.swing.JTextField();
        txtP4M1Max = new javax.swing.JTextField();
        jLabel81 = new javax.swing.JLabel();
        txtP4M2Max = new javax.swing.JTextField();
        jLabel82 = new javax.swing.JLabel();
        txtP4M2Min = new javax.swing.JTextField();
        jLabel83 = new javax.swing.JLabel();
        txtP4M3Max = new javax.swing.JTextField();
        jLabel84 = new javax.swing.JLabel();
        txtP4M3Min = new javax.swing.JTextField();
        jLabel85 = new javax.swing.JLabel();
        txtP4M4Max = new javax.swing.JTextField();
        jLabel86 = new javax.swing.JLabel();
        txtP4M4Min = new javax.swing.JTextField();
        jLabel87 = new javax.swing.JLabel();
        txtP4M8Min = new javax.swing.JTextField();
        jLabel88 = new javax.swing.JLabel();
        jLabel89 = new javax.swing.JLabel();
        jLabel90 = new javax.swing.JLabel();
        txtP4M6Min = new javax.swing.JTextField();
        txtP4M6Max = new javax.swing.JTextField();
        txtP4M7Min = new javax.swing.JTextField();
        jLabel91 = new javax.swing.JLabel();
        txtP4M8Max = new javax.swing.JTextField();
        jLabel92 = new javax.swing.JLabel();
        jLabel93 = new javax.swing.JLabel();
        txtP4M7Max = new javax.swing.JTextField();
        jLabel94 = new javax.swing.JLabel();
        txtP4M5Min = new javax.swing.JTextField();
        txtP4M5Max = new javax.swing.JTextField();
        jLabel95 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        txtP1Utilidad = new javax.swing.JTextField();
        txtP2Utilidad = new javax.swing.JTextField();
        txtP3Utilidad = new javax.swing.JTextField();
        txtP4Utilidad = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        botonSiguienteMP1 = new javax.swing.JButton();
        panelAlgoritmos = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtGenCantidadMax = new javax.swing.JTextField();
        txtGenCantIndividuos = new javax.swing.JTextField();
        jLabel47 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jLabel48 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        jLabel51 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        txtPorcentajeElitista = new javax.swing.JTextField();
        txtPorcentajeRanking = new javax.swing.JTextField();
        txtPorcentajeRuleta = new javax.swing.JTextField();
        txtPorcentajeCopias = new javax.swing.JTextField();
        txtPorcentajeTorneo = new javax.swing.JTextField();
        jLabel53 = new javax.swing.JLabel();
        txtPorcentajeCruzaSimple = new javax.swing.JTextField();
        jLabel54 = new javax.swing.JLabel();
        txtPorcentajeCruzaMultipunto = new javax.swing.JTextField();
        jLabel55 = new javax.swing.JLabel();
        txtPorcentajeCruzaBinomial = new javax.swing.JTextField();
        jLabel56 = new javax.swing.JLabel();
        jLabel57 = new javax.swing.JLabel();
        txtPorcentajeMutacionAsc = new javax.swing.JTextField();
        txtPorcentajeMutacionDesc = new javax.swing.JTextField();
        chkUsarElitista = new javax.swing.JCheckBox();
        chkUsarRanking = new javax.swing.JCheckBox();
        chkUsarRuleta = new javax.swing.JCheckBox();
        chkUsarCopias = new javax.swing.JCheckBox();
        chkUsarTorneo = new javax.swing.JCheckBox();
        chkUsarCruzaSimple = new javax.swing.JCheckBox();
        chkUsarCruzaMultipunto = new javax.swing.JCheckBox();
        chkUsarCruzaBinomial = new javax.swing.JCheckBox();
        chkUsarMutacionAsc = new javax.swing.JCheckBox();
        chkUsarMutacionDesc = new javax.swing.JCheckBox();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        jLabel116 = new javax.swing.JLabel();
        jLabel117 = new javax.swing.JLabel();
        jLabel118 = new javax.swing.JLabel();
        jLabel119 = new javax.swing.JLabel();
        jLabel120 = new javax.swing.JLabel();
        jLabel121 = new javax.swing.JLabel();
        jLabel122 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel58 = new javax.swing.JLabel();
        jLabel59 = new javax.swing.JLabel();
        jLabel60 = new javax.swing.JLabel();
        txtMutacionProbMin = new javax.swing.JTextField();
        txtMutacionProbMax = new javax.swing.JTextField();
        txtMutacionLambda = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jLabel125 = new javax.swing.JLabel();
        labelObjetivo = new javax.swing.JLabel();
        jLabel124 = new javax.swing.JLabel();
        txtObjetivo = new javax.swing.JTextField();
        jLabel126 = new javax.swing.JLabel();
        labelMaximoTeorico = new javax.swing.JLabel();
        jLabel128 = new javax.swing.JLabel();
        jLabel129 = new javax.swing.JLabel();
        txtObjetivoGeneraciones = new javax.swing.JTextField();
        jLabel130 = new javax.swing.JLabel();
        jLabel127 = new javax.swing.JLabel();
        btnRestaurarAlgoritmos = new javax.swing.JButton();
        btnGuardarAlgoritmos = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        panelCorrida = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        botonAceptar = new javax.swing.JButton();
        botonPausar = new javax.swing.JButton();
        botonPoblacionActual = new javax.swing.JButton();
        botonUltimaGeneracion = new javax.swing.JButton();
        botonPrimeraGeneracion = new javax.swing.JButton();
        botonAnteriorGeneracion = new javax.swing.JButton();
        botonSiguienteGeneracion = new javax.swing.JButton();
        jPanel17 = new javax.swing.JPanel();
        lblCalculandoMostrando = new javax.swing.JLabel();
        jLabel109 = new javax.swing.JLabel();
        jLabel110 = new javax.swing.JLabel();
        jLabel111 = new javax.swing.JLabel();
        labelGeneración = new javax.swing.JLabel();
        labelMasApto = new javax.swing.JLabel();
        labelMenosApto = new javax.swing.JLabel();
        labelPromedio = new javax.swing.JLabel();
        jLabel112 = new javax.swing.JLabel();
        labelProgreso = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaMejoresInd = new javax.swing.JTable();
        jLabel123 = new javax.swing.JLabel();
        mostrarEvolucion = new javax.swing.JButton();
        jLabel99 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        botonGuardar = new javax.swing.JButton();
        btnAtrasCorrida = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Inteligencia artificial 2012");
        setMinimumSize(new java.awt.Dimension(800, 600));
        setResizable(false);

        tabs.setMinimumSize(new java.awt.Dimension(790, 538));

        panelMateriasPrimas.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel15.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel15.setMaximumSize(new java.awt.Dimension(500, 113));
        jPanel15.setMinimumSize(new java.awt.Dimension(500, 113));
        jPanel15.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel61.setText("Material 1:");
        jPanel15.add(jLabel61, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 70, -1, -1));

        m1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m1, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 70, 60, -1));

        jLabel100.setText("Material 2:");
        jPanel15.add(jLabel100, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 100, -1, -1));

        m2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m2, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 100, 60, -1));

        jLabel101.setText("Material 3:");
        jPanel15.add(jLabel101, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 130, -1, -1));

        m3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m3, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 130, 60, -1));

        jLabel102.setText("Material 5:");
        jPanel15.add(jLabel102, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 190, -1, 10));

        m5.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m5, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 190, 60, 20));

        jLabel103.setText("Material 6:");
        jPanel15.add(jLabel103, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 220, -1, 10));

        m6.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m6, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 220, 60, 20));

        jLabel104.setText("Material7:");
        jPanel15.add(jLabel104, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 250, -1, 10));

        m7.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m7, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 60, 20));

        jLabel105.setText("Material 4:");
        jPanel15.add(jLabel105, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, -1, 10));

        m4.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m4, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 160, 60, 20));

        jLabel106.setText("Material 8:");
        jPanel15.add(jLabel106, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 280, -1, 10));

        m8.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel15.add(m8, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 280, 60, 20));

        botonSiguienteMP.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-forward32.png"))); // NOI18N
        botonSiguienteMP.setText("Siguiente");
        botonSiguienteMP.setToolTipText("Ir a configuración de producto");
        botonSiguienteMP.setFocusPainted(false);
        botonSiguienteMP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSiguienteMPActionPerformed(evt);
            }
        });
        jPanel15.add(botonSiguienteMP, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 460, 220, -1));

        botonAleatorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Font32.png"))); // NOI18N
        botonAleatorio.setText("Rellenar aleatoriamente");
        botonAleatorio.setToolTipText("Rellena los materiales aleatoriamente");
        botonAleatorio.setFocusPainted(false);
        botonAleatorio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAleatorioActionPerformed(evt);
            }
        });
        jPanel15.add(botonAleatorio, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 330, 220, -1));

        botonLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Trash-can32.png"))); // NOI18N
        botonLimpiar.setText("Limpiar");
        botonLimpiar.setToolTipText("Borra los valores para todos los materiales");
        botonLimpiar.setFocusPainted(false);
        botonLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonLimpiarActionPerformed(evt);
            }
        });
        jPanel15.add(botonLimpiar, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 380, 220, -1));

        jLabel11.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
        jLabel11.setText("Materia prima disponible");
        jPanel15.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 20, -1, -1));

        panelMateriasPrimas.add(jPanel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 0, 280, 520));

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/GP.gif"))); // NOI18N
        jButton3.setBorderPainted(false);
        jButton3.setFocusPainted(false);
        jButton3.setFocusable(false);
        jButton3.setRequestFocusEnabled(false);
        jButton3.setVerifyInputWhenFocusTarget(false);
        panelMateriasPrimas.add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 510, 520));

        tabs.addTab("Materias Primas", panelMateriasPrimas);

        panelProducto.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel1.setText("Restricciónes de los productos");
        jPanel3.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1));

        jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel6.setText("m1=");

        jLabel2.setText("Producto 1");

        txtP1M1Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtP1M1Min.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        txtP1M1Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel7.setText("a");

        txtP1M2Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel14.setText("a");

        txtP1M2Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel15.setText("m2=");

        txtP1M3Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel16.setText("a");

        txtP1M3Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel17.setText("m3=");

        txtP1M4Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel18.setText("a");

        txtP1M4Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel19.setText("m4=");

        txtP1M8Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel20.setText("a");

        jLabel21.setText("m5=");

        jLabel22.setText("m8=");

        txtP1M6Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP1M6Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP1M7Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel23.setText("m7=");

        txtP1M8Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel24.setText("a");

        jLabel25.setText("m6=");

        txtP1M7Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel26.setText("a");

        txtP1M5Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtP1M5Min.setMinimumSize(new java.awt.Dimension(6, 59));

        txtP1M5Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel27.setText("a");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel27)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel26)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel24)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP1M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel6)
                    .addComponent(txtP1M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(txtP1M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(txtP1M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)
                    .addComponent(txtP1M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17)
                    .addComponent(txtP1M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16)
                    .addComponent(txtP1M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19)
                    .addComponent(txtP1M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(txtP1M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(txtP1M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27)
                    .addComponent(txtP1M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25)
                    .addComponent(txtP1M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20)
                    .addComponent(txtP1M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23)
                    .addComponent(txtP1M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel26)
                    .addComponent(txtP1M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22)
                    .addComponent(txtP1M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24)
                    .addComponent(txtP1M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1, -1));

        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel28.setText("m1=");

        jLabel29.setText("Producto 2");

        txtP2M1Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP2M1Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel30.setText("a");

        txtP2M2Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel31.setText("a");

        txtP2M2Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel32.setText("m2=");

        txtP2M3Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel33.setText("a");

        txtP2M3Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel34.setText("m3=");

        txtP2M4Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel35.setText("a");

        txtP2M4Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel36.setText("m4=");

        txtP2M8Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel37.setText("a");

        jLabel38.setText("m5=");

        jLabel39.setText("m8=");

        txtP2M6Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP2M6Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP2M7Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel40.setText("m7=");

        txtP2M8Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel41.setText("a");

        jLabel42.setText("m6=");

        txtP2M7Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel43.setText("a");

        txtP2M5Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP2M5Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel44.setText("a");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel38)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel44)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel42)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel37)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel40)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel43)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel39)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel41)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel29)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel32)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel34)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel33)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP2M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(jLabel28)
                    .addComponent(txtP2M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30)
                    .addComponent(txtP2M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32)
                    .addComponent(txtP2M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel31)
                    .addComponent(txtP2M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(txtP2M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33)
                    .addComponent(txtP2M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel36)
                    .addComponent(txtP2M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(txtP2M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(txtP2M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel44)
                    .addComponent(txtP2M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42)
                    .addComponent(txtP2M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37)
                    .addComponent(txtP2M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtP2M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43)
                    .addComponent(txtP2M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtP2M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel41)
                    .addComponent(txtP2M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, -1, -1));

        jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel62.setText("m1=");

        jLabel63.setText("Producto 3");

        txtP3M1Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP3M1Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel64.setText("a");

        txtP3M2Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel65.setText("a");

        txtP3M2Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel66.setText("m2=");

        txtP3M3Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel67.setText("a");

        txtP3M3Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel68.setText("m3=");

        txtP3M4Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel69.setText("a");

        txtP3M4Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel70.setText("m4=");

        txtP3M8Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel71.setText("a");

        jLabel72.setText("m5=");

        jLabel73.setText("m8=");

        txtP3M6Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP3M6Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP3M7Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel74.setText("m7=");

        txtP3M8Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel75.setText("a");

        jLabel76.setText("m6=");

        txtP3M7Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel77.setText("a");

        txtP3M5Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP3M5Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel78.setText("a");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel72)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel78)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel76)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel71)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel74)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel77)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel73)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel75)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel63)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel62)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel64)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel66)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel65)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel68)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel67)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel70)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel69)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP3M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel63)
                    .addComponent(jLabel62)
                    .addComponent(txtP3M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel64)
                    .addComponent(txtP3M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel66)
                    .addComponent(txtP3M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel65)
                    .addComponent(txtP3M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel68)
                    .addComponent(txtP3M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel67)
                    .addComponent(txtP3M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel70)
                    .addComponent(txtP3M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel69)
                    .addComponent(txtP3M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel72)
                    .addComponent(txtP3M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel78)
                    .addComponent(txtP3M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel76)
                    .addComponent(txtP3M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel71)
                    .addComponent(txtP3M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel74)
                    .addComponent(txtP3M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel77)
                    .addComponent(txtP3M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel73)
                    .addComponent(txtP3M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel75)
                    .addComponent(txtP3M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.add(jPanel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 180, -1, -1));

        jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel79.setText("m1=");

        jLabel80.setText("Producto 4");

        txtP4M1Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP4M1Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel81.setText("a");

        txtP4M2Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel82.setText("a");

        txtP4M2Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel83.setText("m2=");

        txtP4M3Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel84.setText("a");

        txtP4M3Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel85.setText("m3=");

        txtP4M4Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel86.setText("a");

        txtP4M4Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel87.setText("m4=");

        txtP4M8Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel88.setText("a");

        jLabel89.setText("m5=");

        jLabel90.setText("m8=");

        txtP4M6Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP4M6Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP4M7Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel91.setText("m7=");

        txtP4M8Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel92.setText("a");

        jLabel93.setText("m6=");

        txtP4M7Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel94.setText("a");

        txtP4M5Min.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        txtP4M5Max.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        jLabel95.setText("a");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel89)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel95)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel93)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel88)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel91)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel94)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel90)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel92)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel80)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel79)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel81)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel83)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel82)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel85)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel84)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel87)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel86)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtP4M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel80)
                    .addComponent(jLabel79)
                    .addComponent(txtP4M1Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel81)
                    .addComponent(txtP4M1Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel83)
                    .addComponent(txtP4M2Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel82)
                    .addComponent(txtP4M2Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel85)
                    .addComponent(txtP4M3Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel84)
                    .addComponent(txtP4M3Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel87)
                    .addComponent(txtP4M4Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel86)
                    .addComponent(txtP4M4Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel89)
                    .addComponent(txtP4M5Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel95)
                    .addComponent(txtP4M5Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel93)
                    .addComponent(txtP4M6Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel88)
                    .addComponent(txtP4M6Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel91)
                    .addComponent(txtP4M7Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel94)
                    .addComponent(txtP4M7Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel90)
                    .addComponent(txtP4M8Min, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel92)
                    .addComponent(txtP4M8Max, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.add(jPanel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 260, -1, -1));

        panelProducto.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, -1, 340));

        jPanel10.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel3.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel3.setText("Utilidades de los productos");
        jPanel10.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1));

        jPanel9.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel9.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel4.setText("Producto 1 ($)");
        jPanel9.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1, -1));

        jLabel96.setText("Producto 2 ($)");
        jPanel9.add(jLabel96, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 20, -1, -1));

        jLabel97.setText("Producto 3 ($)");
        jPanel9.add(jLabel97, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 20, -1, -1));

        jLabel98.setText("Producto 4 ($)");
        jPanel9.add(jLabel98, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 20, -1, -1));

        txtP1Utilidad.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel9.add(txtP1Utilidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, 60, -1));

        txtP2Utilidad.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel9.add(txtP2Utilidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 20, 60, -1));

        txtP3Utilidad.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel9.add(txtP3Utilidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 20, 60, -1));

        txtP4Utilidad.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel9.add(txtP4Utilidad, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 20, 60, -1));

        jPanel10.add(jPanel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 750, 60));

        panelProducto.add(jPanel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 770, 90));

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-forward32.png"))); // NOI18N
        jButton1.setText("Siguiente");
        jButton1.setToolTipText("Ir a configuración de algoritmos");
        jButton1.setFocusPainted(false);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        panelProducto.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 470, 180, -1));

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Counterclockwise-arrow32.png"))); // NOI18N
        jButton2.setText("Valores por defecto");
        jButton2.setToolTipText("Cargar/Restaurar valores por defecto para todos los campos");
        jButton2.setFocusPainted(false);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        panelProducto.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 470, 200, -1));

        botonSiguienteMP1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-backward32.png"))); // NOI18N
        botonSiguienteMP1.setText("Atrás");
        botonSiguienteMP1.setToolTipText("Ir a materias primas");
        botonSiguienteMP1.setFocusPainted(false);
        botonSiguienteMP1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSiguienteMP1ActionPerformed(evt);
            }
        });
        panelProducto.add(botonSiguienteMP1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 470, 180, -1));

        tabs.addTab("Configuración de producto", panelProducto);

        panelAlgoritmos.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel11.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel5.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel5.setText("Condiciones de parada");
        jPanel11.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 130, -1, -1));

        jPanel12.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel12.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel8.setText("Cantidad máxima de generaciones:");
        jPanel12.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));

        jLabel9.setText("Cantidad de individuos:");
        jPanel12.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1));

        txtGenCantidadMax.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel12.add(txtGenCantidadMax, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 20, 50, -1));

        txtGenCantIndividuos.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel12.add(txtGenCantIndividuos, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 50, 50, -1));

        jPanel11.add(jPanel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 40, 300, 80));

        jLabel47.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel47.setText("Algoritmos genéticos");
        jPanel11.add(jLabel47, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1, -1));

        jPanel14.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel14.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel48.setText("Selección elitista:");
        jPanel14.add(jLabel48, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, -1, -1));

        jLabel49.setText("Selección por ranking:");
        jPanel14.add(jLabel49, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 90, -1, -1));

        jLabel50.setText("Selección por ruleta:");
        jPanel14.add(jLabel50, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 120, -1, -1));

        jLabel51.setText("Selección por copias esperadas:");
        jPanel14.add(jLabel51, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 150, -1, -1));

        jLabel52.setText("Selección por torneo:");
        jPanel14.add(jLabel52, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 180, -1, -1));

        txtPorcentajeElitista.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeElitista, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 60, 50, -1));

        txtPorcentajeRanking.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeRanking, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 90, 50, -1));

        txtPorcentajeRuleta.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeRuleta, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 120, 50, -1));

        txtPorcentajeCopias.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeCopias, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 150, 50, -1));

        txtPorcentajeTorneo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeTorneo, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 180, 50, -1));

        jLabel53.setText("Cruza simple:");
        jPanel14.add(jLabel53, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, -1, -1));

        txtPorcentajeCruzaSimple.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeCruzaSimple, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 210, 50, -1));

        jLabel54.setText("Cruza Multipunto:");
        jPanel14.add(jLabel54, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 240, -1, -1));

        txtPorcentajeCruzaMultipunto.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeCruzaMultipunto, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 240, 50, -1));

        jLabel55.setText("Cruza Binomial:");
        jPanel14.add(jLabel55, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, -1, -1));

        txtPorcentajeCruzaBinomial.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeCruzaBinomial, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 270, 50, -1));

        jLabel56.setText("Mutación por temp. ascendente:");
        jPanel14.add(jLabel56, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 300, -1, -1));

        jLabel57.setText("Mutación por temp. descendente:");
        jPanel14.add(jLabel57, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 330, -1, -1));

        txtPorcentajeMutacionAsc.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeMutacionAsc, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 300, 50, -1));

        txtPorcentajeMutacionDesc.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel14.add(txtPorcentajeMutacionDesc, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 330, 50, -1));
        jPanel14.add(chkUsarElitista, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 60, -1, -1));
        jPanel14.add(chkUsarRanking, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 90, -1, -1));
        jPanel14.add(chkUsarRuleta, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 120, -1, -1));
        jPanel14.add(chkUsarCopias, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 150, -1, -1));
        jPanel14.add(chkUsarTorneo, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 180, -1, -1));
        jPanel14.add(chkUsarCruzaSimple, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 210, -1, -1));
        jPanel14.add(chkUsarCruzaMultipunto, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 240, -1, -1));
        jPanel14.add(chkUsarCruzaBinomial, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 270, -1, -1));
        jPanel14.add(chkUsarMutacionAsc, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 300, -1, -1));

        chkUsarMutacionDesc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkUsarMutacionDescActionPerformed(evt);
            }
        });
        jPanel14.add(chkUsarMutacionDesc, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 330, -1, -1));

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel12.setText("Tipo de operador");
        jPanel14.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));

        jLabel13.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel13.setText("Porcentaje de individuos");
        jPanel14.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, -1, -1));

        jLabel45.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel45.setText("Usar");
        jPanel14.add(jLabel45, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 20, -1, -1));

        jLabel108.setText("%");
        jPanel14.add(jLabel108, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 330, -1, -1));

        jLabel114.setText("%");
        jPanel14.add(jLabel114, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 90, -1, -1));

        jLabel115.setText("%");
        jPanel14.add(jLabel115, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 120, -1, -1));

        jLabel116.setText("%");
        jPanel14.add(jLabel116, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 150, -1, -1));

        jLabel117.setText("%");
        jPanel14.add(jLabel117, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 180, -1, -1));

        jLabel118.setText("%");
        jPanel14.add(jLabel118, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 210, -1, -1));

        jLabel119.setText("%");
        jPanel14.add(jLabel119, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 240, -1, -1));

        jLabel120.setText("%");
        jPanel14.add(jLabel120, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 270, -1, -1));

        jLabel121.setText("%");
        jPanel14.add(jLabel121, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 300, -1, -1));

        jLabel122.setText("%");
        jPanel14.add(jLabel122, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 60, -1, -1));

        jPanel11.add(jPanel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 430, 400));

        jLabel46.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel46.setText("Ajustes de mutación");
        jPanel11.add(jLabel46, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 320, -1, -1));

        jPanel13.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel13.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel58.setText("Probabilidad mínima:");
        jPanel13.add(jLabel58, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, -1, 20));

        jLabel59.setText("Probabilidad maxima:");
        jPanel13.add(jLabel59, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, -1, 20));

        jLabel60.setText("Lambda:");
        jPanel13.add(jLabel60, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1, 20));

        txtMutacionProbMin.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtMutacionProbMin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMutacionProbMinActionPerformed(evt);
            }
        });
        jPanel13.add(txtMutacionProbMin, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 10, 50, 20));

        txtMutacionProbMax.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel13.add(txtMutacionProbMax, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 40, 50, 20));

        txtMutacionLambda.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jPanel13.add(txtMutacionLambda, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 70, 50, 20));

        jPanel11.add(jPanel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 340, 300, 100));

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel125.setText("mejora en utilidad máxima:");
        jPanel1.add(jLabel125, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1));

        labelObjetivo.setText("ingresar %");
        jPanel1.add(labelObjetivo, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 80, -1, -1));

        jLabel124.setText("Porcentaje utilidad objetivo:");
        jPanel1.add(jLabel124, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1));

        txtObjetivo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtObjetivo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtObjetivoKeyReleased(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtObjetivoKeyTyped(evt);
            }
        });
        jPanel1.add(txtObjetivo, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 50, 50, -1));

        jLabel126.setText("Utilidad máxima teórica:");
        jPanel1.add(jLabel126, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));

        labelMaximoTeorico.setText("1000");
        jPanel1.add(labelMaximoTeorico, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 20, -1, -1));

        jLabel128.setText("Utilidad objetivo:");
        jPanel1.add(jLabel128, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, -1, -1));

        jLabel129.setText("Número de generaciones sin");
        jPanel1.add(jLabel129, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, -1, -1));

        txtObjetivoGeneraciones.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtObjetivoGeneraciones.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtObjetivoGeneracionesKeyReleased(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtObjetivoGeneracionesKeyTyped(evt);
            }
        });
        jPanel1.add(txtObjetivoGeneraciones, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 110, 50, -1));

        jLabel130.setText("%");
        jPanel1.add(jLabel130, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 50, -1, -1));

        jPanel11.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 150, 300, 160));

        jLabel127.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel127.setText("Configuración de corrida");
        jPanel11.add(jLabel127, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 20, -1, -1));

        panelAlgoritmos.add(jPanel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 1, 760, 450));

        btnRestaurarAlgoritmos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Counterclockwise-arrow32.png"))); // NOI18N
        btnRestaurarAlgoritmos.setText("Valores por defecto");
        btnRestaurarAlgoritmos.setToolTipText("Cargar/Restaurar valores por defecto para todos los campos");
        btnRestaurarAlgoritmos.setFocusPainted(false);
        btnRestaurarAlgoritmos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRestaurarAlgoritmosActionPerformed(evt);
            }
        });
        panelAlgoritmos.add(btnRestaurarAlgoritmos, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 470, 200, -1));

        btnGuardarAlgoritmos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-forward32.png"))); // NOI18N
        btnGuardarAlgoritmos.setText("Siguiente");
        btnGuardarAlgoritmos.setToolTipText("Ir a pantalla de corrida");
        btnGuardarAlgoritmos.setFocusPainted(false);
        btnGuardarAlgoritmos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarAlgoritmosActionPerformed(evt);
            }
        });
        panelAlgoritmos.add(btnGuardarAlgoritmos, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 470, 180, -1));

        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-backward32.png"))); // NOI18N
        jButton4.setText("Atrás");
        jButton4.setToolTipText("Ir a configuración de producto");
        jButton4.setFocusPainted(false);
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        panelAlgoritmos.add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 470, 180, -1));

        tabs.addTab("Configuración de algoritmos", panelAlgoritmos);

        panelCorrida.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel16.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel16.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        botonAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Play64.png"))); // NOI18N
        botonAceptar.setToolTipText("Comenzar/Cancelar corrida");
        botonAceptar.setFocusPainted(false);
        botonAceptar.setFocusable(false);
        botonAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAceptarActionPerformed(evt);
            }
        });
        jPanel16.add(botonAceptar, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 20, 100, 80));

        botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Pause64.png"))); // NOI18N
        botonPausar.setToolTipText("Pausar/Reanudar corrida");
        botonPausar.setEnabled(false);
        botonPausar.setFocusPainted(false);
        botonPausar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPausarActionPerformed(evt);
            }
        });
        jPanel16.add(botonPausar, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 20, 100, 80));

        botonPoblacionActual.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Monitoring64.png"))); // NOI18N
        botonPoblacionActual.setToolTipText("Ver generación");
        botonPoblacionActual.setEnabled(false);
        botonPoblacionActual.setFocusPainted(false);
        botonPoblacionActual.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPoblacionActualActionPerformed(evt);
            }
        });
        jPanel16.add(botonPoblacionActual, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 20, 80, 80));

        botonUltimaGeneracion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Skip-forward64.png"))); // NOI18N
        botonUltimaGeneracion.setToolTipText("Ir 50 generaciones adelante");
        botonUltimaGeneracion.setEnabled(false);
        botonUltimaGeneracion.setFocusPainted(false);
        botonUltimaGeneracion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonUltimaGeneracionActionPerformed(evt);
            }
        });
        jPanel16.add(botonUltimaGeneracion, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 20, 80, 80));

        botonPrimeraGeneracion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Skip-backward64.png"))); // NOI18N
        botonPrimeraGeneracion.setToolTipText("Ir 50 generaciones atrás");
        botonPrimeraGeneracion.setEnabled(false);
        botonPrimeraGeneracion.setFocusPainted(false);
        botonPrimeraGeneracion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPrimeraGeneracionActionPerformed(evt);
            }
        });
        jPanel16.add(botonPrimeraGeneracion, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 20, 80, 80));

        botonAnteriorGeneracion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-backward64.png"))); // NOI18N
        botonAnteriorGeneracion.setToolTipText("Ir a la generación anterior");
        botonAnteriorGeneracion.setEnabled(false);
        botonAnteriorGeneracion.setFocusPainted(false);
        botonAnteriorGeneracion.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                botonAnteriorGeneracionMousePressed(evt);
            }
        });
        botonAnteriorGeneracion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAnteriorGeneracionActionPerformed(evt);
            }
        });
        jPanel16.add(botonAnteriorGeneracion, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 20, 80, 80));

        botonSiguienteGeneracion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-forward64.png"))); // NOI18N
        botonSiguienteGeneracion.setToolTipText("Ir a la siguiente generación");
        botonSiguienteGeneracion.setEnabled(false);
        botonSiguienteGeneracion.setFocusPainted(false);
        botonSiguienteGeneracion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSiguienteGeneracionActionPerformed(evt);
            }
        });
        jPanel16.add(botonSiguienteGeneracion, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 20, 80, 80));

        panelCorrida.add(jPanel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, 750, 120));

        jPanel17.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel17.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        lblCalculandoMostrando.setText("Mostrando:");
        jPanel17.add(lblCalculandoMostrando, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 20, -1, -1));

        jLabel109.setText("Top 3 de combianciones distintas con alta utilidad");
        jPanel17.add(jLabel109, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, -1, -1));

        jLabel110.setText("Aptitud del individuo menos apto:");
        jPanel17.add(jLabel110, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 60, -1, -1));

        jLabel111.setText("Aptitud promedio:");
        jPanel17.add(jLabel111, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 60, -1, -1));

        labelGeneración.setText("no iniciada");
        jPanel17.add(labelGeneración, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 20, -1, -1));

        labelMasApto.setText("...");
        jPanel17.add(labelMasApto, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 60, 50, -1));

        labelMenosApto.setText("...");
        jPanel17.add(labelMenosApto, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 60, 50, -1));

        labelPromedio.setText("...");
        jPanel17.add(labelPromedio, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 60, 60, -1));

        jLabel112.setText("Estado de la corrida:");
        jPanel17.add(jLabel112, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 150, -1));

        labelProgreso.setText("no iniciada");
        jPanel17.add(labelProgreso, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 20, 90, -1));

        tablaMejoresInd.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Individuo", "Producto 1", "Producto 2", "Producto 3", "Producto 4", "Utilidad", "Detalles"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaMejoresInd.setName("tabla"); // NOI18N
        tablaMejoresInd.setRowHeight(25);
        tablaMejoresInd.getTableHeader().setReorderingAllowed(false);
        tablaMejoresInd.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaMejoresIndMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                tablaMejoresIndMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                tablaMejoresIndMouseExited(evt);
            }
        });
        tablaMejoresInd.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                tablaMejoresIndMouseDragged(evt);
            }
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                tablaMejoresIndMouseMoved(evt);
            }
        });
        jScrollPane1.setViewportView(tablaMejoresInd);

        jPanel17.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, 720, 100));

        jLabel123.setText("Aptitud del individuo más apto:");
        jPanel17.add(jLabel123, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, -1, -1));

        panelCorrida.add(jPanel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, 750, 230));

        mostrarEvolucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Line-chart32.png"))); // NOI18N
        mostrarEvolucion.setText("Gráfico de evolución");
        mostrarEvolucion.setToolTipText("Mostrar gráfico de evolucion hasta la generacion seleccionada");
        mostrarEvolucion.setEnabled(false);
        mostrarEvolucion.setFocusPainted(false);
        mostrarEvolucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mostrarEvolucionActionPerformed(evt);
            }
        });
        panelCorrida.add(mostrarEvolucion, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 470, 200, -1));

        jLabel99.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel99.setText("Control de corridas");
        panelCorrida.add(jLabel99, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));

        jLabel107.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
        jLabel107.setText("Corrida actual");
        panelCorrida.add(jLabel107, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 180, -1, -1));

        botonGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Text-align--justify32.png"))); // NOI18N
        botonGuardar.setText("Guardar Corrida");
        botonGuardar.setToolTipText("Guardar corrida completa");
        botonGuardar.setEnabled(false);
        botonGuardar.setFocusPainted(false);
        botonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonGuardarActionPerformed(evt);
            }
        });
        panelCorrida.add(botonGuardar, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 470, 180, -1));

        btnAtrasCorrida.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Fast-backward32.png"))); // NOI18N
        btnAtrasCorrida.setText("Atrás");
        btnAtrasCorrida.setToolTipText("Ir a configuración de algoritmos");
        btnAtrasCorrida.setFocusPainted(false);
        btnAtrasCorrida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAtrasCorridaActionPerformed(evt);
            }
        });
        panelCorrida.add(btnAtrasCorrida, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 470, 180, -1));

        tabs.addTab("Corrida", panelCorrida);

        jMenu1.setText("Archivo");

        jMenuItem2.setText("Acerca de");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem1.setText("Salir");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(tabs, javax.swing.GroupLayout.PREFERRED_SIZE, 814, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(tabs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
       System.exit(0);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        loadConfiguracionProductoDefaults();
        Settings.defaultConfiguracionProducto();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        try{
        // Obtener todos los valores de la pantalla, verificarlos y llamar a
       Settings.intervalosProducto[1].setMinimo(Integer.parseInt(this.txtP1M1Min.getText()));
       Settings.intervalosProducto[1].setMaximo(Integer.parseInt(this.txtP1M1Max.getText()));
       Settings.intervalosProducto[2].setMinimo(Integer.parseInt(this.txtP1M2Min.getText()));
       Settings.intervalosProducto[2].setMaximo(Integer.parseInt(this.txtP1M2Max.getText()));
       Settings.intervalosProducto[3].setMinimo(Integer.parseInt(this.txtP1M3Min.getText()));
       Settings.intervalosProducto[3].setMaximo(Integer.parseInt(this.txtP1M3Max.getText()));
       Settings.intervalosProducto[4].setMinimo(Integer.parseInt(this.txtP1M4Min.getText()));
       Settings.intervalosProducto[4].setMaximo(Integer.parseInt(this.txtP1M4Max.getText()));
       Settings.intervalosProducto[5].setMinimo(Integer.parseInt(this.txtP1M5Min.getText()));
       Settings.intervalosProducto[5].setMaximo(Integer.parseInt(this.txtP1M5Max.getText()));
       Settings.intervalosProducto[6].setMinimo(Integer.parseInt(this.txtP1M6Min.getText()));
       Settings.intervalosProducto[6].setMaximo(Integer.parseInt(this.txtP1M6Max.getText()));
       Settings.intervalosProducto[7].setMinimo(Integer.parseInt(this.txtP1M7Min.getText()));
       Settings.intervalosProducto[7].setMaximo(Integer.parseInt(this.txtP1M7Max.getText()));
       Settings.intervalosProducto[8].setMinimo(Integer.parseInt(this.txtP1M8Min.getText()));
       Settings.intervalosProducto[8].setMaximo(Integer.parseInt(this.txtP1M8Max.getText()));
       
       Settings.intervalosProducto[10].setMinimo(Integer.parseInt(this.txtP2M1Min.getText()));
       Settings.intervalosProducto[10].setMaximo(Integer.parseInt(this.txtP2M1Max.getText()));
       Settings.intervalosProducto[11].setMinimo(Integer.parseInt(this.txtP2M2Min.getText()));
       Settings.intervalosProducto[11].setMaximo(Integer.parseInt(this.txtP2M2Max.getText()));
       Settings.intervalosProducto[12].setMinimo(Integer.parseInt(this.txtP2M3Min.getText()));
       Settings.intervalosProducto[12].setMaximo(Integer.parseInt(this.txtP2M3Max.getText()));
       Settings.intervalosProducto[13].setMinimo(Integer.parseInt(this.txtP2M4Min.getText()));
       Settings.intervalosProducto[13].setMaximo(Integer.parseInt(this.txtP2M4Max.getText()));
       Settings.intervalosProducto[14].setMinimo(Integer.parseInt(this.txtP2M5Min.getText()));
       Settings.intervalosProducto[14].setMaximo(Integer.parseInt(this.txtP2M5Max.getText()));
       Settings.intervalosProducto[15].setMinimo(Integer.parseInt(this.txtP2M6Min.getText()));
       Settings.intervalosProducto[15].setMaximo(Integer.parseInt(this.txtP2M6Max.getText()));
       Settings.intervalosProducto[16].setMinimo(Integer.parseInt(this.txtP2M7Min.getText()));
       Settings.intervalosProducto[16].setMaximo(Integer.parseInt(this.txtP2M7Max.getText()));
       Settings.intervalosProducto[17].setMinimo(Integer.parseInt(this.txtP2M8Min.getText()));
       Settings.intervalosProducto[17].setMaximo(Integer.parseInt(this.txtP2M8Max.getText()));
       
       Settings.intervalosProducto[19].setMinimo(Integer.parseInt(this.txtP3M1Min.getText()));
       Settings.intervalosProducto[19].setMaximo(Integer.parseInt(this.txtP3M1Max.getText()));
       Settings.intervalosProducto[20].setMinimo(Integer.parseInt(this.txtP3M2Min.getText()));
       Settings.intervalosProducto[20].setMaximo(Integer.parseInt(this.txtP3M2Max.getText()));
       Settings.intervalosProducto[21].setMinimo(Integer.parseInt(this.txtP3M3Min.getText()));
       Settings.intervalosProducto[21].setMaximo(Integer.parseInt(this.txtP3M3Max.getText()));
       Settings.intervalosProducto[22].setMinimo(Integer.parseInt(this.txtP3M4Min.getText()));
       Settings.intervalosProducto[22].setMaximo(Integer.parseInt(this.txtP3M4Max.getText()));
       Settings.intervalosProducto[23].setMinimo(Integer.parseInt(this.txtP3M5Min.getText()));
       Settings.intervalosProducto[23].setMaximo(Integer.parseInt(this.txtP3M5Max.getText()));
       Settings.intervalosProducto[24].setMinimo(Integer.parseInt(this.txtP3M6Min.getText()));
       Settings.intervalosProducto[24].setMaximo(Integer.parseInt(this.txtP3M6Max.getText()));
       Settings.intervalosProducto[25].setMinimo(Integer.parseInt(this.txtP3M7Min.getText()));
       Settings.intervalosProducto[25].setMaximo(Integer.parseInt(this.txtP3M7Max.getText()));
       Settings.intervalosProducto[26].setMinimo(Integer.parseInt(this.txtP3M8Min.getText()));
       Settings.intervalosProducto[26].setMaximo(Integer.parseInt(this.txtP3M8Max.getText()));
      
       Settings.intervalosProducto[28].setMinimo(Integer.parseInt(this.txtP4M1Min.getText()));
       Settings.intervalosProducto[28].setMaximo(Integer.parseInt(this.txtP4M1Max.getText()));
       Settings.intervalosProducto[29].setMinimo(Integer.parseInt(this.txtP4M2Min.getText()));
       Settings.intervalosProducto[29].setMaximo(Integer.parseInt(this.txtP4M2Max.getText()));
       Settings.intervalosProducto[30].setMinimo(Integer.parseInt(this.txtP4M3Min.getText()));
       Settings.intervalosProducto[30].setMaximo(Integer.parseInt(this.txtP4M3Max.getText()));
       Settings.intervalosProducto[31].setMinimo(Integer.parseInt(this.txtP4M4Min.getText()));
       Settings.intervalosProducto[31].setMaximo(Integer.parseInt(this.txtP4M4Max.getText()));
       Settings.intervalosProducto[32].setMinimo(Integer.parseInt(this.txtP4M5Min.getText()));
       Settings.intervalosProducto[32].setMaximo(Integer.parseInt(this.txtP4M5Max.getText()));
       Settings.intervalosProducto[33].setMinimo(Integer.parseInt(this.txtP4M6Min.getText()));
       Settings.intervalosProducto[33].setMaximo(Integer.parseInt(this.txtP4M6Max.getText()));
       Settings.intervalosProducto[34].setMinimo(Integer.parseInt(this.txtP4M7Min.getText()));
       Settings.intervalosProducto[34].setMaximo(Integer.parseInt(this.txtP4M7Max.getText()));
       Settings.intervalosProducto[35].setMinimo(Integer.parseInt(this.txtP4M8Min.getText()));
       Settings.intervalosProducto[35].setMaximo(Integer.parseInt(this.txtP4M8Max.getText()));
       Settings.utilidades[0]= Integer.parseInt(this.txtP1Utilidad.getText());
       Settings.utilidades[1]= Integer.parseInt(this.txtP2Utilidad.getText());
       Settings.utilidades[2]= Integer.parseInt(this.txtP3Utilidad.getText());
       Settings.utilidades[3]= Integer.parseInt(this.txtP4Utilidad.getText());
       
       this.labelMaximoTeorico.setText(new Integer(IndividuoManager.getMaximoTeorico()).toString());
       this.txtObjetivoKeyReleased(null);
       
       this.cambiarATabNro(2);
       
       }catch(Exception e){
            JOptionPane.showMessageDialog(this, "Algun valor es erróneo. Por favor controle todos los campos.");
        }
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void chkUsarMutacionDescActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkUsarMutacionDescActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_chkUsarMutacionDescActionPerformed

    private void btnRestaurarAlgoritmosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRestaurarAlgoritmosActionPerformed
              loadConfiguracionAlgoritmosDefaults();
              Settings.defaultConfiguracionAlgoritmos();
              this.txtObjetivoKeyReleased(null);
    }//GEN-LAST:event_btnRestaurarAlgoritmosActionPerformed

    private void btnGuardarAlgoritmosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarAlgoritmosActionPerformed
        try{
            Settings.cantidadGeneraciones= Integer.parseInt(this.txtGenCantidadMax.getText());
            Settings.totalPoblacion= Integer.parseInt(this.txtGenCantIndividuos.getText());
            Settings.porcentajeDeAceptacion= Double.parseDouble(this.txtObjetivo.getText()) /100;
            Settings.objectivoGeneraciones= Integer.parseInt(this.txtObjetivoGeneraciones.getText());

            Settings.pm= Double.parseDouble(this.txtMutacionProbMin.getText());
            Settings.pM= Double.parseDouble(this.txtMutacionProbMax.getText());
            Settings.lambda= Double.parseDouble(this.txtMutacionLambda.getText());

            Settings.limpiarAlgoritmosGeneticos();
            int porcentaje=0;
            int porcentajeTotal=0;

            if(this.chkUsarElitista.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeElitista.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.SeleccionElitista,porcentaje );
            }
            if(this.chkUsarRanking.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeRanking.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.SeleccionPorRanking,porcentaje );
            }
            if(this.chkUsarRuleta.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeRuleta.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.SeleccionPorRuleta,porcentaje );
            }
            if(this.chkUsarCopias.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeCopias.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.SeleccionPorCopiasEsperadas, porcentaje);
            }
            if(this.chkUsarTorneo.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeTorneo.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.SeleccionPorTorneo,porcentaje );
            }
            if(this.chkUsarCruzaSimple.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeCruzaSimple.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.CruzaSimple, porcentaje);
            }
            if(this.chkUsarCruzaMultipunto.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeCruzaMultipunto.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.CruzaMultipunto, porcentaje );
            }
            if(this.chkUsarCruzaBinomial.isSelected()){
                porcentaje=  Integer.parseInt(this.txtPorcentajeCruzaBinomial.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.CruzaBinomial,porcentaje);
            }
            if(this.chkUsarMutacionAsc.isSelected()){
                porcentaje=  Integer.parseInt(this.txtPorcentajeMutacionAsc.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.MutacionPorTempAscendente, porcentaje);
            }
            if(this.chkUsarMutacionDesc.isSelected()){
                porcentaje= Integer.parseInt(this.txtPorcentajeMutacionDesc.getText());
                porcentajeTotal+= porcentaje;
                Settings.agregarAlgoritmoGenetico(Operador.MutacionPorTempDescendente, porcentaje);
            }

            if(porcentajeTotal!=100){
                JOptionPane.showMessageDialog(this, "El porcentaje total de individuos debe ser igual a 100, verifique los valores ingresados por favor.");
                return;
            }
            
            if(Settings.objectivoGeneraciones<0 || Settings.objectivoGeneraciones>Settings.cantidadGeneraciones){
                JOptionPane.showMessageDialog(this, "El número de generaciones sin mejora en utilidad máxima debe ser menor a la cantidad maxima de generaciones.");
                return;
            }
            
            this.cambiarATabNro(3);

        }catch(Exception e){
            JOptionPane.showMessageDialog(this, "Algun valor es erróneo. Por favor controle todos los campos.");
        }

    }//GEN-LAST:event_btnGuardarAlgoritmosActionPerformed

    private void botonAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAceptarActionPerformed
        //se realiza siempre que se presiona el boton Comenzar/Cancelar
        //desactiavr botones
        botonPoblacionActual.setEnabled(false);
        mostrarEvolucion.setEnabled(false);
        
        //poner indice generacion a 0
        indiceGeneracion=0;
        
        if(cancelado){
            //Empieza la corrida
            //la primera vez cancelado es true
            GeneracionManager.borrarTodo();
            pausado=false;
            finCorrida=false;
            cancelado=false;    

            actualizarPantallaIniciarCorrida();
            
            //iniciar corrida
            iniciarCorrida(); 

        }else{
            //Se cancela la corrida actual
            cancelado=true;
            pausado=false;
            actualizarPantallaCancelarCorrida();
        }
        
    }//GEN-LAST:event_botonAceptarActionPerformed

    private void botonPausarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPausarActionPerformed
        if(pausado) {
           //reanudando
            pausado =false;
            reanudarIteraciones();     
            
            mostrarEvolucion.setEnabled(false);
            botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Pause64.png")));
            lblCalculandoMostrando.setText("Calculando:");
            botonPoblacionActual.setEnabled(false);
            botonPrimeraGeneracion.setEnabled(false);
            botonSiguienteGeneracion.setEnabled(false);
            botonAnteriorGeneracion.setEnabled(false);
            botonUltimaGeneracion.setEnabled(false);
            labelProgreso.setText("En Progreso");
        }
        else {
            pausado = true;
            botonPausar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/assets/Play64.png")));
            lblCalculandoMostrando.setText("Mostrando:");
            mostrarEvolucion.setEnabled(true);
            botonPoblacionActual.setEnabled(true);
            
            labelProgreso.setText("Pausada");
        }
    }//GEN-LAST:event_botonPausarActionPerformed

    private void botonPoblacionActualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPoblacionActualActionPerformed
       VisorPoblacion ventanaPoblacion= new VisorPoblacion(indiceGeneracionMostrada, indiceGeneracion);
       ventanaPoblacion.setSize(800, 600);
       ventanaPoblacion.setLocation(this.getLocation());
       ventanaPoblacion.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
       ventanaPoblacion.setResizable(false);
       ventanaPoblacion.setVisible(true);
    }//GEN-LAST:event_botonPoblacionActualActionPerformed

    private void mostrarEvolucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mostrarEvolucionActionPerformed
        panelCorrida.setCursor(new Cursor(Cursor.WAIT_CURSOR));
        
        LineChart grafico = new LineChart("Evolución de aptitudes hasta generación: "+indiceGeneracionMostrada,indiceGeneracionMostrada);
        grafico.setSize(800, 600);
        grafico.setLocation(this.getLocation());
        grafico.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
        grafico.setResizable(true);
        grafico.setVisible(true);
        
        panelCorrida.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }//GEN-LAST:event_mostrarEvolucionActionPerformed

    private void botonUltimaGeneracionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonUltimaGeneracionActionPerformed
        int i= indiceGeneracionMostrada +50;
        if(i>indiceGeneracion){
            i=indiceGeneracion;
        }
        indiceGeneracionMostrada=i;
        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada);
        actualizarBotonesNavegacion();
    }//GEN-LAST:event_botonUltimaGeneracionActionPerformed

    private void botonPrimeraGeneracionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPrimeraGeneracionActionPerformed
        int i= indiceGeneracionMostrada -50;
        if(i<0){
            i=0;
        }
        indiceGeneracionMostrada=i;
        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada);
        actualizarBotonesNavegacion();
    }//GEN-LAST:event_botonPrimeraGeneracionActionPerformed

    private void botonAnteriorGeneracionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAnteriorGeneracionActionPerformed
        indiceGeneracionMostrada=indiceGeneracionMostrada-1;
        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada);
        actualizarBotonesNavegacion();
    }//GEN-LAST:event_botonAnteriorGeneracionActionPerformed

    private void botonSiguienteGeneracionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSiguienteGeneracionActionPerformed
        indiceGeneracionMostrada=indiceGeneracionMostrada+1;
        actualizarDatoMejoresIndividuos(indiceGeneracionMostrada);
        actualizarBotonesNavegacion();
    }//GEN-LAST:event_botonSiguienteGeneracionActionPerformed

    private void txtMutacionProbMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMutacionProbMinActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMutacionProbMinActionPerformed

    private void botonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonGuardarActionPerformed
        PDFCorrida.crearPDF(indiceGeneracion, this);
    }//GEN-LAST:event_botonGuardarActionPerformed

    private void botonAleatorioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAleatorioActionPerformed
        int limite = 0;
        if (Math.random()<=0.5) limite = 10000;
        else limite =100000;
        
        int[] mat= new int[8];
        for (int i = 0; i<8; i++){
            mat[i]=(int) (Math.random()*limite)+limite;
        }
        
        m1.setText(String.valueOf(mat[0]));
        m2.setText(String.valueOf(mat[1]));
        m3.setText(String.valueOf(mat[2]));
        m4.setText(String.valueOf(mat[3]));
        m5.setText(String.valueOf(mat[4]));
        m6.setText(String.valueOf(mat[5]));
        m7.setText(String.valueOf(mat[6]));
        m8.setText(String.valueOf(mat[7]));   
    }//GEN-LAST:event_botonAleatorioActionPerformed

    private void botonLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonLimpiarActionPerformed
       m1.setText("");
       m2.setText("");
       m3.setText("");
       m4.setText("");
       m5.setText("");
       m6.setText("");
       m7.setText("");
       m8.setText("");
    }//GEN-LAST:event_botonLimpiarActionPerformed

    private void botonSiguienteMPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSiguienteMPActionPerformed
        
        try{
            
            mat1 = Integer.parseInt(m1.getText());
            mat2 = Integer.parseInt(m2.getText());
            mat3 = Integer.parseInt(m3.getText());
            mat4 = Integer.parseInt(m4.getText());
            mat5 = Integer.parseInt(m5.getText());
            mat6 = Integer.parseInt(m6.getText());
            mat7 = Integer.parseInt(m7.getText());
            mat8 = Integer.parseInt(m8.getText());

            int[]materiales={mat1,mat2,mat3,mat4,mat5,mat6,mat7,mat8};

            //IndividuoManager se inicializa con los valores de materia prima disponibles y los intervalos que restringen el problema
            //dentro del metodo se cargan los datos correspondientes a los intervalos de cantidad de producto y se calcula el maximo teorico
            //e debe ejecutar antes de uilizar IndividuoManager sin excepcion
            IndividuoManager.inicializar(materiales, Settings.intervalosProducto,Settings.utilidades);

            //si las cantidades son correctas
            this.cambiarATabNro(1);
            
        }catch (Exception e){
            //este mensaje se muestra en caso de que algún material ingresado por el usuario
            //sea incorrecto
            JOptionPane.showMessageDialog(this,"Algunas cantidades son incorrectas. Por favor modifíquelas e intente nuevamente." , "Error", 1);
        } 
        
    }//GEN-LAST:event_botonSiguienteMPActionPerformed

    private void botonSiguienteMP1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSiguienteMP1ActionPerformed
        this.cambiarATabNro(0);
    }//GEN-LAST:event_botonSiguienteMP1ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        this.cambiarATabNro(1);
    }//GEN-LAST:event_jButton4ActionPerformed

    private void btnAtrasCorridaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAtrasCorridaActionPerformed
        this.cambiarATabNro(2);
    }//GEN-LAST:event_btnAtrasCorridaActionPerformed

    private void txtObjetivoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtObjetivoKeyTyped

    }//GEN-LAST:event_txtObjetivoKeyTyped

    private void txtObjetivoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtObjetivoKeyReleased
        int porcentaje=0;
        double fraccion=0;
        int objetivo=0;
        
        try{
            
            if(txtObjetivo.getText().isEmpty()) return;
                
            porcentaje= Integer.parseInt(txtObjetivo.getText());
            
            if(porcentaje>0 && porcentaje<=100){
               
                fraccion= Double.parseDouble(this.txtObjetivo.getText()) /100;
               objetivo= (int) (IndividuoManager.getMaximoTeorico()*fraccion);
                labelObjetivo.setText(new Integer(objetivo).toString());
                
            }else{
                throw new Exception("error");
            }
        }catch(Exception e){
            JOptionPane.showMessageDialog(this,"Solo se pueden ingresar enteros del 1 al 100" , "Error", 1);
            this.txtObjetivo.setText("");
            this.labelObjetivo.setText("ingresar %");
        }
    }//GEN-LAST:event_txtObjetivoKeyReleased

    private void botonAnteriorGeneracionMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonAnteriorGeneracionMousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_botonAnteriorGeneracionMousePressed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        acercaDe= new AcercaDe();
        acercaDe.setLocation(this.getLocation().x+150, this.getLocation().y+100);
        acercaDe.setSize(500, 245);
        acercaDe.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
        acercaDe.setResizable(false);
        acercaDe.setVisible(true);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void tablaMejoresIndMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMejoresIndMouseClicked
       if(tablaMejoresInd.getSelectedColumn()!=6) return;
       if(!pausado && !finCorrida) return;
       Generacion generacion= GeneracionManager.getGeneracionNumero(indiceGeneracionMostrada);
       int ind= generacion.obtenerMejoresIndividuos(3)[tablaMejoresInd.getSelectedRow()].getNroIndividuo();
       VisorPoblacion ventanaPoblacion= new VisorPoblacion(indiceGeneracionMostrada,indiceGeneracion,ind);
       ventanaPoblacion.setSize(800, 600);
       ventanaPoblacion.setLocation(this.getLocation());
       ventanaPoblacion.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
       ventanaPoblacion.setResizable(false);
       ventanaPoblacion.setVisible(true);
       
    }//GEN-LAST:event_tablaMejoresIndMouseClicked

    private void tablaMejoresIndMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMejoresIndMouseEntered

    }//GEN-LAST:event_tablaMejoresIndMouseEntered

    private void tablaMejoresIndMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMejoresIndMouseExited
     
    }//GEN-LAST:event_tablaMejoresIndMouseExited

    private void tablaMejoresIndMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMejoresIndMouseDragged
        // TODO add your handling code here:
    }//GEN-LAST:event_tablaMejoresIndMouseDragged

    private void tablaMejoresIndMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaMejoresIndMouseMoved
        if(tablaMejoresInd.columnAtPoint(evt.getPoint())==6){
            tablaMejoresInd.setCursor(new Cursor(Cursor.HAND_CURSOR));
        }else{
            tablaMejoresInd.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        }
    }//GEN-LAST:event_tablaMejoresIndMouseMoved

    private void txtObjetivoGeneracionesKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtObjetivoGeneracionesKeyReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_txtObjetivoGeneracionesKeyReleased

    private void txtObjetivoGeneracionesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtObjetivoGeneracionesKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_txtObjetivoGeneracionesKeyTyped

    private void loadConfiguracionProductoDefaults() {
        Intervalo[] intervalos= Defaults.intervalosProducto;
       
        this.txtP1M1Min.setText(new Integer(intervalos[1].getMinimo()).toString());
        this.txtP1M1Max.setText(new Integer(intervalos[1].getMaximo()).toString());
        this.txtP1M2Min.setText(new Integer(intervalos[2].getMinimo()).toString());
        this.txtP1M2Max.setText(new Integer(intervalos[2].getMaximo()).toString());
        this.txtP1M3Min.setText(new Integer(intervalos[3].getMinimo()).toString());
        this.txtP1M3Max.setText(new Integer(intervalos[3].getMaximo()).toString());
        this.txtP1M4Min.setText(new Integer(intervalos[4].getMinimo()).toString());
        this.txtP1M4Max.setText(new Integer(intervalos[4].getMaximo()).toString());
        this.txtP1M5Min.setText(new Integer(intervalos[5].getMinimo()).toString());
        this.txtP1M5Max.setText(new Integer(intervalos[5].getMaximo()).toString());
        this.txtP1M6Min.setText(new Integer(intervalos[6].getMinimo()).toString());
        this.txtP1M6Max.setText(new Integer(intervalos[6].getMaximo()).toString());
        this.txtP1M7Min.setText(new Integer(intervalos[7].getMinimo()).toString());
        this.txtP1M7Max.setText(new Integer(intervalos[7].getMaximo()).toString());
        this.txtP1M8Min.setText(new Integer(intervalos[8].getMinimo()).toString());
        this.txtP1M8Max.setText(new Integer(intervalos[8].getMaximo()).toString());
        
        this.txtP2M1Min.setText(new Integer(intervalos[10].getMinimo()).toString());
        this.txtP2M1Max.setText(new Integer(intervalos[10].getMaximo()).toString());
        this.txtP2M2Min.setText(new Integer(intervalos[11].getMinimo()).toString());
        this.txtP2M2Max.setText(new Integer(intervalos[11].getMaximo()).toString());
        this.txtP2M3Min.setText(new Integer(intervalos[12].getMinimo()).toString());
        this.txtP2M3Max.setText(new Integer(intervalos[12].getMaximo()).toString());
        this.txtP2M4Min.setText(new Integer(intervalos[13].getMinimo()).toString());
        this.txtP2M4Max.setText(new Integer(intervalos[13].getMaximo()).toString());
        this.txtP2M5Min.setText(new Integer(intervalos[14].getMinimo()).toString());
        this.txtP2M5Max.setText(new Integer(intervalos[14].getMaximo()).toString());
        this.txtP2M6Min.setText(new Integer(intervalos[15].getMinimo()).toString());
        this.txtP2M6Max.setText(new Integer(intervalos[15].getMaximo()).toString());
        this.txtP2M7Min.setText(new Integer(intervalos[16].getMinimo()).toString());
        this.txtP2M7Max.setText(new Integer(intervalos[16].getMaximo()).toString());
        this.txtP2M8Min.setText(new Integer(intervalos[17].getMinimo()).toString());
        this.txtP2M8Max.setText(new Integer(intervalos[17].getMaximo()).toString());
        
        this.txtP3M1Min.setText(new Integer(intervalos[19].getMinimo()).toString());
        this.txtP3M1Max.setText(new Integer(intervalos[19].getMaximo()).toString());
        this.txtP3M2Min.setText(new Integer(intervalos[20].getMinimo()).toString());
        this.txtP3M2Max.setText(new Integer(intervalos[20].getMaximo()).toString());
        this.txtP3M3Min.setText(new Integer(intervalos[21].getMinimo()).toString());
        this.txtP3M3Max.setText(new Integer(intervalos[21].getMaximo()).toString());
        this.txtP3M4Min.setText(new Integer(intervalos[22].getMinimo()).toString());
        this.txtP3M4Max.setText(new Integer(intervalos[22].getMaximo()).toString());
        this.txtP3M5Min.setText(new Integer(intervalos[23].getMinimo()).toString());
        this.txtP3M5Max.setText(new Integer(intervalos[23].getMaximo()).toString());
        this.txtP3M6Min.setText(new Integer(intervalos[24].getMinimo()).toString());
        this.txtP3M6Max.setText(new Integer(intervalos[24].getMaximo()).toString());
        this.txtP3M7Min.setText(new Integer(intervalos[25].getMinimo()).toString());
        this.txtP3M7Max.setText(new Integer(intervalos[25].getMaximo()).toString());
        this.txtP3M8Min.setText(new Integer(intervalos[26].getMinimo()).toString());
        this.txtP3M8Max.setText(new Integer(intervalos[26].getMaximo()).toString());
        
        this.txtP4M1Min.setText(new Integer(intervalos[28].getMinimo()).toString());
        this.txtP4M1Max.setText(new Integer(intervalos[28].getMaximo()).toString());
        this.txtP4M2Min.setText(new Integer(intervalos[29].getMinimo()).toString());
        this.txtP4M2Max.setText(new Integer(intervalos[29].getMaximo()).toString());
        this.txtP4M3Min.setText(new Integer(intervalos[30].getMinimo()).toString());
        this.txtP4M3Max.setText(new Integer(intervalos[30].getMaximo()).toString());
        this.txtP4M4Min.setText(new Integer(intervalos[31].getMinimo()).toString());
        this.txtP4M4Max.setText(new Integer(intervalos[31].getMaximo()).toString());
        this.txtP4M5Min.setText(new Integer(intervalos[32].getMinimo()).toString());
        this.txtP4M5Max.setText(new Integer(intervalos[32].getMaximo()).toString());
        this.txtP4M6Min.setText(new Integer(intervalos[33].getMinimo()).toString());
        this.txtP4M6Max.setText(new Integer(intervalos[33].getMaximo()).toString());
        this.txtP4M7Min.setText(new Integer(intervalos[34].getMinimo()).toString());
        this.txtP4M7Max.setText(new Integer(intervalos[34].getMaximo()).toString());
        this.txtP4M8Min.setText(new Integer(intervalos[35].getMinimo()).toString());
        this.txtP4M8Max.setText(new Integer(intervalos[35].getMaximo()).toString());
        
        this.txtP1Utilidad.setText(new Integer(Defaults.utilidades[0]).toString());
        this.txtP2Utilidad.setText(new Integer(Defaults.utilidades[1]).toString());
        this.txtP3Utilidad.setText(new Integer(Defaults.utilidades[2]).toString());
        this.txtP4Utilidad.setText(new Integer(Defaults.utilidades[3]).toString());
        
    }

    private void loadConfiguracionAlgoritmosDefaults() {
       Operador[] operadores= Individuo.Operador.values();
        Map <Individuo.Operador,Integer> algoritmos = Defaults.algoritmosGeneticos;
           
        for(int i=0;i<operadores.length;i++){
                int porcentaje= 0;
                Operador operador=operadores[i];
                 
                     if(operador==Operador.SeleccionElitista){
                        if(algoritmos.containsKey(operador)){
                             porcentaje=algoritmos.get(operador);
                            this.txtPorcentajeElitista.setText(new Integer(porcentaje).toString());
                            this.chkUsarElitista.setSelected(true);
                        }else{
                            this.txtPorcentajeElitista.setText(new Integer(0).toString());
                            this.chkUsarElitista.setSelected(false);
                        }
                        
                     }
                     if(operador==Operador.SeleccionPorRanking){
                        if(algoritmos.containsKey(operador)){
                            porcentaje=algoritmos.get(operador);
                           this.txtPorcentajeRanking.setText(new Integer(porcentaje).toString());
                           this.chkUsarRanking.setSelected(true);
                        }else{
                            this.txtPorcentajeRanking.setText(new Integer(0).toString());
                           this.chkUsarRanking.setSelected(false);
                        }
                     }
                     if(operador==Operador.SeleccionPorCopiasEsperadas){
                  
                        if(algoritmos.containsKey(operador)){
                            porcentaje=algoritmos.get(operador);
                            this.txtPorcentajeCopias.setText(new Integer(porcentaje).toString());
                            this.chkUsarCopias.setSelected(true);
                        }else{
                             this.txtPorcentajeCopias.setText(new Integer(0).toString());
                            this.chkUsarCopias.setSelected(false);
                        }
                        
                     }
                     if(operador==Operador.SeleccionPorRuleta){
                         if(algoritmos.containsKey(operador)){
                            porcentaje=algoritmos.get(operador);
                            this.txtPorcentajeRuleta.setText(new Integer(porcentaje).toString());
                            this.chkUsarRuleta.setSelected(true);
                        }else{
                             this.txtPorcentajeRuleta.setText(new Integer(0).toString());
                            this.chkUsarRuleta.setSelected(false);
                        }
                     }
                     if(operador==Operador.SeleccionPorTorneo){
                        if(algoritmos.containsKey(operador)){
                              porcentaje=algoritmos.get(operador);
                            this.txtPorcentajeTorneo.setText(new Integer(porcentaje).toString());
                            this.chkUsarTorneo.setSelected(true);
                        
                        }else{
                            this.txtPorcentajeTorneo.setText(new Integer(0).toString());
                            this.chkUsarTorneo.setSelected(false);
                        }
                     }
                     if(operador==Operador.CruzaSimple){
                        
                         if(algoritmos.containsKey(operador)){
                             porcentaje=algoritmos.get(operador);
                        this.txtPorcentajeCruzaSimple.setText(new Integer(porcentaje).toString());
                        this.chkUsarCruzaSimple.setSelected(true);
                        
                        }else{
                            this.txtPorcentajeCruzaSimple.setText(new Integer(0).toString());
                        this.chkUsarCruzaSimple.setSelected(false);
                        }
                     }
                     if(operador==Operador.CruzaMultipunto){
                       
                       if(algoritmos.containsKey(operador)){
                          porcentaje=algoritmos.get(operador);
                        this.txtPorcentajeCruzaMultipunto.setText(new Integer(porcentaje).toString());
                        this.chkUsarCruzaMultipunto.setSelected(true);
                        
                        }else{
                            this.txtPorcentajeCruzaMultipunto.setText(new Integer(0).toString());
                        this.chkUsarCruzaMultipunto.setSelected(false);
                        }
                        
                     }
                     if(operador==Operador.CruzaBinomial){
                    
                         if(algoritmos.containsKey(operador)){
                          porcentaje=algoritmos.get(operador);
                        this.txtPorcentajeCruzaBinomial.setText(new Integer(porcentaje).toString());
                        this.chkUsarCruzaBinomial.setSelected(true);
                        
                        }else{
                           this.txtPorcentajeCruzaBinomial.setText(new Integer(0).toString());
                        this.chkUsarCruzaBinomial.setSelected(false);
                        }
                     }
                     
                     if(operador==Operador.MutacionPorTempAscendente){
                     
                        if(algoritmos.containsKey(operador)){
                           porcentaje=algoritmos.get(operador);
                        this.txtPorcentajeMutacionAsc.setText(new Integer(porcentaje).toString());
                        this.chkUsarMutacionAsc.setSelected(true);
                        }else{
                            this.txtPorcentajeMutacionAsc.setText(new Integer(0).toString());
                            this.chkUsarMutacionAsc.setSelected(false);
                        }
                     }
                     
                     if(operador==Operador.MutacionPorTempDescendente){
                        
                        if(algoritmos.containsKey(operador)){
                           porcentaje=algoritmos.get(operador);
                        this.txtPorcentajeMutacionDesc.setText(new Integer(porcentaje).toString());
                        this.chkUsarMutacionDesc.setSelected(true);
                        
                        }else{
                            this.txtPorcentajeMutacionDesc.setText(new Integer(0).toString());
                        this.chkUsarMutacionDesc.setSelected(false);
                        }
                 }     
            }
        
        
        this.txtGenCantIndividuos.setText(new Integer(Defaults.totalPoblacion).toString());
        this.txtGenCantidadMax.setText(new Integer(Defaults.cantidadGeneraciones).toString());
        this.txtObjetivo.setText(new Integer((new Double(Defaults.porcentajeDeAceptacion *100).intValue())).toString());
        this.txtObjetivoGeneraciones.setText(new Integer(Defaults.objectivoGeneraciones).toString());
        
        this.txtMutacionProbMin.setText(new Double(Defaults.pm).toString());
        this.txtMutacionProbMax.setText(new Double(Defaults.pM).toString());
        this.txtMutacionLambda.setText(new Double(Defaults.lambda).toString());
   
    }
    
   private void cambiarATabNro(int index) {
       //habilita solo el tab que selecciono
        for(int i=0;i<this.tabs.getTabCount();i++){
            this.tabs.setEnabledAt(i, index==i);
        }
        
        this.tabs.setSelectedIndex(index);
   }

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonAceptar;
    private javax.swing.JButton botonAleatorio;
    private javax.swing.JButton botonAnteriorGeneracion;
    private javax.swing.JButton botonGuardar;
    private javax.swing.JButton botonLimpiar;
    private javax.swing.JButton botonPausar;
    private javax.swing.JButton botonPoblacionActual;
    private javax.swing.JButton botonPrimeraGeneracion;
    private javax.swing.JButton botonSiguienteGeneracion;
    private javax.swing.JButton botonSiguienteMP;
    private javax.swing.JButton botonSiguienteMP1;
    private javax.swing.JButton botonUltimaGeneracion;
    private javax.swing.JButton btnAtrasCorrida;
    private javax.swing.JButton btnGuardarAlgoritmos;
    private javax.swing.JButton btnRestaurarAlgoritmos;
    private javax.swing.JCheckBox chkUsarCopias;
    private javax.swing.JCheckBox chkUsarCruzaBinomial;
    private javax.swing.JCheckBox chkUsarCruzaMultipunto;
    private javax.swing.JCheckBox chkUsarCruzaSimple;
    private javax.swing.JCheckBox chkUsarElitista;
    private javax.swing.JCheckBox chkUsarMutacionAsc;
    private javax.swing.JCheckBox chkUsarMutacionDesc;
    private javax.swing.JCheckBox chkUsarRanking;
    private javax.swing.JCheckBox chkUsarRuleta;
    private javax.swing.JCheckBox chkUsarTorneo;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel116;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel122;
    private javax.swing.JLabel jLabel123;
    private javax.swing.JLabel jLabel124;
    private javax.swing.JLabel jLabel125;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel127;
    private javax.swing.JLabel jLabel128;
    private javax.swing.JLabel jLabel129;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel130;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel labelGeneración;
    private javax.swing.JLabel labelMasApto;
    private javax.swing.JLabel labelMaximoTeorico;
    private javax.swing.JLabel labelMenosApto;
    private javax.swing.JLabel labelObjetivo;
    private javax.swing.JLabel labelProgreso;
    private javax.swing.JLabel labelPromedio;
    private javax.swing.JLabel lblCalculandoMostrando;
    private javax.swing.JTextField m1;
    private javax.swing.JTextField m2;
    private javax.swing.JTextField m3;
    private javax.swing.JTextField m4;
    private javax.swing.JTextField m5;
    private javax.swing.JTextField m6;
    private javax.swing.JTextField m7;
    private javax.swing.JTextField m8;
    private javax.swing.JButton mostrarEvolucion;
    private javax.swing.JPanel panelAlgoritmos;
    private javax.swing.JPanel panelCorrida;
    private javax.swing.JPanel panelMateriasPrimas;
    private javax.swing.JPanel panelProducto;
    private javax.swing.JTable tablaMejoresInd;
    private javax.swing.JTabbedPane tabs;
    private javax.swing.JTextField txtGenCantIndividuos;
    private javax.swing.JTextField txtGenCantidadMax;
    private javax.swing.JTextField txtMutacionLambda;
    private javax.swing.JTextField txtMutacionProbMax;
    private javax.swing.JTextField txtMutacionProbMin;
    private javax.swing.JTextField txtObjetivo;
    private javax.swing.JTextField txtObjetivoGeneraciones;
    private javax.swing.JTextField txtP1M1Max;
    private javax.swing.JTextField txtP1M1Min;
    private javax.swing.JTextField txtP1M2Max;
    private javax.swing.JTextField txtP1M2Min;
    private javax.swing.JTextField txtP1M3Max;
    private javax.swing.JTextField txtP1M3Min;
    private javax.swing.JTextField txtP1M4Max;
    private javax.swing.JTextField txtP1M4Min;
    private javax.swing.JTextField txtP1M5Max;
    private javax.swing.JTextField txtP1M5Min;
    private javax.swing.JTextField txtP1M6Max;
    private javax.swing.JTextField txtP1M6Min;
    private javax.swing.JTextField txtP1M7Max;
    private javax.swing.JTextField txtP1M7Min;
    private javax.swing.JTextField txtP1M8Max;
    private javax.swing.JTextField txtP1M8Min;
    private javax.swing.JTextField txtP1Utilidad;
    private javax.swing.JTextField txtP2M1Max;
    private javax.swing.JTextField txtP2M1Min;
    private javax.swing.JTextField txtP2M2Max;
    private javax.swing.JTextField txtP2M2Min;
    private javax.swing.JTextField txtP2M3Max;
    private javax.swing.JTextField txtP2M3Min;
    private javax.swing.JTextField txtP2M4Max;
    private javax.swing.JTextField txtP2M4Min;
    private javax.swing.JTextField txtP2M5Max;
    private javax.swing.JTextField txtP2M5Min;
    private javax.swing.JTextField txtP2M6Max;
    private javax.swing.JTextField txtP2M6Min;
    private javax.swing.JTextField txtP2M7Max;
    private javax.swing.JTextField txtP2M7Min;
    private javax.swing.JTextField txtP2M8Max;
    private javax.swing.JTextField txtP2M8Min;
    private javax.swing.JTextField txtP2Utilidad;
    private javax.swing.JTextField txtP3M1Max;
    private javax.swing.JTextField txtP3M1Min;
    private javax.swing.JTextField txtP3M2Max;
    private javax.swing.JTextField txtP3M2Min;
    private javax.swing.JTextField txtP3M3Max;
    private javax.swing.JTextField txtP3M3Min;
    private javax.swing.JTextField txtP3M4Max;
    private javax.swing.JTextField txtP3M4Min;
    private javax.swing.JTextField txtP3M5Max;
    private javax.swing.JTextField txtP3M5Min;
    private javax.swing.JTextField txtP3M6Max;
    private javax.swing.JTextField txtP3M6Min;
    private javax.swing.JTextField txtP3M7Max;
    private javax.swing.JTextField txtP3M7Min;
    private javax.swing.JTextField txtP3M8Max;
    private javax.swing.JTextField txtP3M8Min;
    private javax.swing.JTextField txtP3Utilidad;
    private javax.swing.JTextField txtP4M1Max;
    private javax.swing.JTextField txtP4M1Min;
    private javax.swing.JTextField txtP4M2Max;
    private javax.swing.JTextField txtP4M2Min;
    private javax.swing.JTextField txtP4M3Max;
    private javax.swing.JTextField txtP4M3Min;
    private javax.swing.JTextField txtP4M4Max;
    private javax.swing.JTextField txtP4M4Min;
    private javax.swing.JTextField txtP4M5Max;
    private javax.swing.JTextField txtP4M5Min;
    private javax.swing.JTextField txtP4M6Max;
    private javax.swing.JTextField txtP4M6Min;
    private javax.swing.JTextField txtP4M7Max;
    private javax.swing.JTextField txtP4M7Min;
    private javax.swing.JTextField txtP4M8Max;
    private javax.swing.JTextField txtP4M8Min;
    private javax.swing.JTextField txtP4Utilidad;
    private javax.swing.JTextField txtPorcentajeCopias;
    private javax.swing.JTextField txtPorcentajeCruzaBinomial;
    private javax.swing.JTextField txtPorcentajeCruzaMultipunto;
    private javax.swing.JTextField txtPorcentajeCruzaSimple;
    private javax.swing.JTextField txtPorcentajeElitista;
    private javax.swing.JTextField txtPorcentajeMutacionAsc;
    private javax.swing.JTextField txtPorcentajeMutacionDesc;
    private javax.swing.JTextField txtPorcentajeRanking;
    private javax.swing.JTextField txtPorcentajeRuleta;
    private javax.swing.JTextField txtPorcentajeTorneo;
    // End of variables declaration//GEN-END:variables





}
